<?php

	 /*
	 * 随机生成16位编号
	 */
	function build_order_no($userid=1234) {//可以作为help类
		$userid=substr($userid,0,4);
		$userid=str_pad($userid,4,"0",STR_PAD_LEFT);
		return substr(date ( 'YmdHis' ),2).$userid;
	}
	
	function getSdate(){//下周二
   		return date('Y-m-d', (time() + (7+2 - date('w'))* 24 * 3600));
	}
	function getEdate(){//下下周一
		return date('Y-m-d', (time() + (14+1 - date('w')) * 24 * 3600));
	}
?>